TIFFWriteEncodedTile

Section: Misc. Reference Manual Pages (3T)
Updated: December 16, 1991
Index Return to Main Contents
 

NAME

TIFFWritedEncodedTile - compress and write a tile of data to an open TIFF file  

SYNOPSIS

#include <tiffio.h>
int TIFFWriteEncodedTile(TIFF* tif, u_int tile, u_char* buf, u_int size)  

DESCRIPTION

Compress size bytes of raw data from buf and append the result to the end of the specified tile. TIFFWriteEncodedTile() returns -1 if an error was encountered; otherwise it returns the value of size. Note that the value of tile is a ``raw tile number.'' That is, the caller must take into account whether or not the data are organized in separate places (PlanarConfiguration=2). TIFFComputeTile() automatically does this when converting an (x,y,z,sample) coordinate quadruple to a tile number.

The library attempts to hide bit- and byte-ordering differences between the image and the native machine by converting data from the native machine order. Bit reversal is always done if the FillOrder tag is opposite to the native machine bit order. Byte swapping of 16- and 32-bit samples is automatically done when Compression=1 (``no compression''), but otherwise is left to the compression algorithms (which should generate compressed data in the native byte ordering of the machine).  

DIAGNOSTICS

All error messages are directed to the TIFFError(3T) routine.

%s: File not open for writing. The file was opened for reading, not writing.

Can not write tiles to a stripped image. The image is assumed to be organized in strips because neither of the TileWidth or TileLength tags have been set with TIFFSetField(3T).

%s: Must set "ImageWidth" before writing data. The image's width has not be set before the first write. See TIFFSetField(3T) for information on how to do this.

%s: Must set "PlanarConfiguration" before writing data. The organization of data has not be defined before the first write. See TIFFSetField(3T) for information on how to do this.

%s: No space for tile arrays". There was not enough space for the arrays that hold tile offsets and byte counts.  

SEE ALSO

intro(3T), TIFFOpen(3T), TIFFWriteTile(3T), TIFFWriteRawTile(3T)


 

Index

NAME
SYNOPSIS
DESCRIPTION
DIAGNOSTICS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 01:45:58 GMT, February 01, 2023